<?php

namespace Home\Controller;

use Think\Controller;

use Home\Biz\CommonBiz;


class InvoiceController extends LoginBaseController {
	
	

	public function invoiceinfo() {
	
		$this->display('invoice/invoiceinfo');
	
	}
	
	public function invoiceitem(){
		$order_id = I('order_id');
		
		$order_invoice_en = M('order_invoice')->where("order_id='%s' AND status = 1", $order_id)->find();
		
		$invoice_serial = $order_invoice_en['invoice_serial_no'];
		
		
		$lst_order_invoice_en_item = M('order_invoice_item')->where(array('invoice_serial_no'=>$invoice_serial))->select();
		
		$order_invoice_en['invoice_status_text'] = CommonBiz::changeInvoiceStatus($order_invoice_en['invoice_status']);
		$order_invoice_en['invoice_kind_text']=CommonBiz::changeInvoiceKind($order_invoice_en['invoice_kind']);
		$this->assign('order_invoice_en', $order_invoice_en);
		$this->assign('lst_order_invoice_en_item',$lst_order_invoice_en_item);
		
		$this->display('invoice/invoiceitem');
	}
	
	public function invoicename() {
	
		$this->display('invoice/invoicename');
	
	}
	
}